package com.dbuil.bleshoes.ui.activity;

import android.content.DialogInterface;

import com.blankj.utilcode.util.ToastUtils;
import com.dbuil.bleshoes.R;
import com.dbuil.bleshoes.base.BaseActivity;
import com.xuexiang.xui.widget.dialog.DialogLoader;

public class DialogActivity extends BaseActivity {
    @Override
    public int getLayoutId() {
        return R.layout.activity_dialog;
    }

    @Override
    public void initData() {
        super.initData();
        setdialog();
    }

    public void setdialog(){



//使用DialogLoader可自由切换dialog显示的策略
        DialogLoader.getInstance().showConfirmDialog(this,"温馨提示","是否要退出登录","确定",confirmlistener,"取消",cancellistener);


    }

    private DialogInterface.OnClickListener  confirmlistener=new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialogInterface, int i) {

            ToastUtils.showLong("确定");
            dialogInterface.dismiss();
        }
    };

    private DialogInterface.OnClickListener  cancellistener=new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            ToastUtils.showLong("取消");
            dialogInterface.dismiss();
        }
    };
}
